#ifndef _GAME_DEFINE_
#define _GAME_DEFINE_
#define _USE_MATH_DEFINES
#include <math.h>
#define GAME_TIME 16.666666667f
#define IS_CHANG_SPRITE 80
//#define ATTACK_RANGE 800
#define BULLET_SPEED 0.25f * GAME_TIME
#define BULLET_SPEED_PLAYER 6.0f
#define IS_MOVE_VEC 2.4f

#define  A 0x0000000f
#define  S 0x000000f0
#define  D 0x00000f00
#define  W 0x0000f000
#define  _U 0x000f0000
#define  I 0x00f00000

enum KB_STATE : int
{
	AS = A | S, AW = A | W, DW = D | W, DS = D | S,
	DI = D|I, AI=A|I, WI= W|I, SI=S|I,
	DU = D|_U, SU = S|_U, AU = A|_U, WU = W|_U,
	ASU = AS | _U, DSU = DS|_U, DWU = DW|_U, AWU = AU|W,
	ASI = AS|I, DSI = DS | I, DWI = DW | I, AWI = AI | W,
	DUI = DU | I, WUI = WU | I, AUI = AU | I, SUI = SU | I,
	DWUI = DWU | I, AWUI = AWU | I, DSUI = DSU | I, ASUI = ASU | I
};

enum BULLET_ID
{
	B_R = 0, B_M, B_S, B_F, B_L, B_E , B_B, B_D
};
#define MAX_BULLET_POOL 50
#define DAS M_PI / 20.0f

enum SPRITE_ID
{
#pragma region PLAYER_SPRITE
	PLAYER_GO_LEFT, PLAYER_GO_RIGHT,
	PLAYER_JUMP_UP_LEFT, PLAYER_JUMP_UP_RIGHT,
	PLAYER_FALL_DOWN_LEFT, PLAYER_FALL_DOWN_RIGHT,
	PLAYER_I, PLAYER_II, PLAYER_III, PLAYER_IV,
	PLAYER_SHOOT_LEFT, PLAYER_SHOOT_RIGHT,
	PLAYER_STAND_LEFT, PLAYER_STAND_RIGHT,
	PLAYER_LIE_LEFT, PLAYER_LIE_RIGHT,
	PLAYER_LIE_SHOOT_LEFT, PLAYER_LIE_SHOOT_RIGHT, 
	PLAYER_STAND_TOP_LEFT, PLAYER_STAND_TOP_RIGHT, 
	PLAYER_SHOOT_TOP_LEFT, PLAYER_SHOOT_TOP_RIGHT,
	PLAYER_GSHOOT_LEFT, PLAYER_GSHOOT_RIGHT,

	PLAYER_SWIM_LEFT, PLAYER_SWIM_RIGHT,
	PLAYER_SWIM_SHOOT_LEFT, PLAYER_SWIM_SHOOT_RIGHT,
	PLAYER_SWIM_I, PLAYER_SWIM_II, 
	PLAYER_SWIM_S_TOP_LEFT, PLAYER_SWIM_S_TOP_RIGHT,
	PLAYER_SWIM_DOWN,

	PLAYER_DIE_LEFT, PLAYER_DIE_RIGHT,
#pragma endregion

#pragma region IS_SPRITE
	IS_GO_LEFT, IS_GO_RIGHT, IS_JUMP_LEFT, IS_JUMP_RIGHT,SINK,IS_SHOOT_LEFT,IS_SHOOT_RIGHT, IS_LIE_SHOOT_LEFT,IS_LIE_SHOOT_RIGHT,
#pragma endregion

#pragma region MAP_SPRITE
	MAP1,MAP3,MAP5,MAP1_EFFECT, MAP3_EFFECT1, MAP3_EFFECT2, MAP5_EFFECT,
#pragma endregion

#pragma region BULLET_SPRITE
	BR, BM, BE, BL, GRENADE,
#pragma endregion

#pragma region BLOCK_HOUSE_SPRITE
	BLOCK_HOUSE_ANGLE, BLOCK_HOUSE_SIMPLE, BLOCK_HOUSE_START,
#pragma endregion

#pragma region EFFECT_SPRITE
	DAMAGE_BRIDGE, EFFECT_EXPLODE1, EFFECT_EXPLODE2, 
#pragma endregion

#pragma region GIFT
	FLYING_GIFT,
#pragma endregion

#pragma region SOLDIER
	SOLDIER_LEFT_GUN,
	SOLDIER_RIGHT_GUN,
	SOLDIER_LEFT_TOP_GUN,
	SOLDIER_RIGH_TOP_GUN,
	SOLDIER_LEFT_BOTTOM_GUN,
	SOLDIER_RIGHT_BOTTOM_GUN,
	SOLDIER2_LEFT,SOLDIER2_RIGHT,
#pragma endregion
#pragma region EMBUSHGUN
	EMBUSHGUN_APPEAR, EMBUSHGUN_GUN,
#pragma endregion

#pragma region DEFENSE CANNON
	DEFENSE_CANNON, EXPLODE_CANNON,
#pragma endregion
#pragma region SCENE
	MENU_BACKGROUND,
	OPTION_ICON,
#pragma endregion
#pragma  region BOSS
	BOSS, BOSS_EXPLODE, BOSS_EFF1, BOSS_EFF2, BOSS_EFF3, BOSS_EFF4, BOSS_EFF5, BOSS_EFF6, BOSS_EFF7, BOSS_EFF8, BOSS_EFF9, BOSS_EFF10,
#pragma endregion
#pragma region World object
	ROCK, FIRE,
#pragma endregion World object

#pragma region Scuba Soldier
	SCUBA_SOLDIER,
#pragma endregion Scuba Soldier
	BOSS3,ARM_BODY,ARM_HAND,BOSS3_FIRE,

#pragma region ANTI_GRAVITY_SHUTTER
	SHUTTER_APPEAR, SHUTTER_DISAPPEAR, SHUTTER_WAITING,
#pragma endregion

#pragma region UFOs
	UFO,
#pragma endregion

#pragma region	WEAPON
	CAPSULES,
	SENSOR,
	MACHINE_GUN,
	SPREAD_GUN,
	FIREBALL_GUN,
	LASER,
	RAPID_UPDATE,
	BARRIER,
	A_BOMB,
#pragma endregion

#pragma region PLATFORM
	MOVE_PLATFORM,
#pragma endregion

#pragma region GUNNER
	GUNNER,
#pragma endregion

#pragma region ARTILLERY
	ARTILLERY
#pragma endregion
};

enum SOUND_ID
{
	MAP1_SOUNDTRACK, MAP3_SOUNDTRACK, MAP5_SOUNDTRACK, TITLE,
	PLAYER_DIE, LANDING, SHOOT_S, SHOOT_L, SHOOT_R, ADD_LIFE, COLLIDE_STATIC_OBJ, WANNING, EXPLODE, ENEMY_DIE, GAMEOVER, CLEARSTATE
};
enum FIND_GROUND
{
	NONE, PRE, NEXT
};
enum ArmState:int
{
	WAVE = 0,ROTATE, FOLLOW , DEATH
};

#endif